package com.selfdriving.activity;

import net.tsz.afinal.annotation.view.ViewInject;

import com.selfdriving.R;
import com.selfdriving.bean.Preference;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class VerifyActivity extends BaseActivity {
	@ViewInject(id = R.id.btnRegister, click = "btnRegister")
	Button btnRegister;

	private int type;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.verify);
		type = getIntent().getIntExtra("type", 0);
	}

	public void btnRegister(View v) {
		if (type == 0) {
			this.finish();
		} else {
			Intent intent = new Intent(this, HomePageActivity.class);
			startActivity(intent);
		}
		putBoolean(Preference.IS_REGISTER_SUCCESS, true, true);
	}

}
